difference Function

public pure function difference(x) result(rst)

Computes the difference between each element in an array.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(in) :: x(:)

The N-element array on which to operate.

Return Value real(kind=real64), allocatable, (:)

The N-1 element array containing the difference between each element in x.